package com.bdq.common.constants;

/**
 * @author malei
 * @date 2024-05-02 15:54
 */
public class Constant {

    /**
     * 文件目录
     */
    public static final String FILE_DIRECTORY = "/Users/malei/Desktop/bdq/root/static";

    /**
     * 阿里云区域ID
     */
    public static final String ALI_YUN_REGION_ID = "cn-beijing";

    /**
     * ALI_YUN_ENDPOINT_OVERRIDE
     */
    public static final String ALI_YUN_ENDPOINT_OVERRIDE = "dysmsapi.aliyuncs.com";

    /**
     * 阿里云短信签名（免签名）
     */
    public static final String ALI_YUN_SMS_SIGN = "阿里云短信测试";

    /**
     * 短信模版
     */
    public static final String ALI_YUN_SMS_TEMPLATE_CODE = "SMS_154950909";

    /**
     * 获取token请求
     */
    public static final String WECHAT_TOKEN_REQUEST = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s";

    /**
     * token秘钥
     */
    public static final String TOKEN_SECRET_KEY = "1234567890abcdef1234567890abcdef";

    /**
     * 请求头
     */
    public interface HeaderField {

        /**
         * token
         */
        String token = "Authorization";
    }

    /**
     * Redis
     */
    public interface RedisKey{

        /**
         * 配置
         */
        String CONFIG = "config";

        /**
         * 微信小程序token
         */
        String WECHAT_MINI_PROGRAM_TOKEN = "wechat:mini:program:token";

        /**
         * 交互数量
         */
        String INTERACTION_NUM = "interaction:num";

        /**
         * 用户推荐页码
         */
        String USER_RECOMMEND_PAGE_NO = "user:recommend:pageNo";

        /**
         * 内容热度
         */
        String CONTENT_HOT = "content:hot";
    }

    /**
     * Redis
     */
    public interface RedisKeyTemplate{

        /**
         * 登录验证码
         */
        String LOGIN_VERIFY_CODE = "login:verify:code:%s";

        /**
         * 登录验证码幂等
         */
        String LOGIN_VERIFY_CODE_IDEMPOTENT = "login:verify:code:idempotent:%s";

        /**
         * 用户Token
         */
        String USER_TOKEN = "user:token:%s";

        /**
         * 用户上下文
         */
        String USER_CONTEXT = "user:context:%s";

        /**
         * 交互投票
         */
        String INTERACTION_VOTE = "interaction:vote:%s";

        /**
         * 用户已经浏览过的
         */
        String USER_VIEWED = "user:viewed:%s";

        /**
         * 城市内容
         */
        String CONTENT_CITY_CONTENT = "content:city:content:%s";
    }

    /**
     * 日期格式化
     */
    public interface DateTimePattern{

        /**
         * 格式一
         */
        String pFirst = "yyyyMMddHHmmss";

        /**
         * 格式一
         */
        String pSecond = "yyyy-MM-dd HH:mm:ss";

        /**
         * 格式三
         */
        String pThird = "yyyy-MM-dd";
    }
}
